<h1>Listing timelines</h1>

        <div class="nav">
            <span class="menuButton">
                 <%= link_to "Create", :controller => "timelines",  :action => "new",:class => "create" %>
            </span>
        </div>
        <div class="body">
            <h1>Timeline List</h1>
            <% if flash[:message] %><%=flash[:message]%><%end%>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                          <td>Id</td>
                           <td>Title</td>
                           <td>Actions</td>

                        </tr>
                    </thead>
                    <tbody>

                      <% timeline_counter=0 %>
                      <% @timelines.each do |timeline| %>

                               <% timeline_counter=timeline_counter+1 %>
                                <tr class=<%= ( timeline_counter.modulo(2))==0 ? "even" : "odd" %> >
                                  <td><%= timeline.id %></td>
                                  <td><%= timeline.title %></td>
                                  <td><%= link_to 'Show', timeline %>
                                  <%= link_to 'Edit', edit_timeline_path(timeline) %>
                                  <%= link_to 'Destroy', timeline, :confirm => 'Are you sure?', :method => :delete %>
                                  </td>
                                </tr>
                     <% end %>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <%= will_paginate @timelines %>
            </div>
        </div>

  <%= link_to 'New timeline', new_timeline_path %>
